import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 天乐设备检查数据
 */
@Entity('device_devicecheck')
export class DeviceDeviceCheckEntity extends BaseEntity {

  @Column({ comment: '系统学员ID', default: 0, nullable: true  })
  sysStudentId: number;

  @Column({ comment: '设备序列号', nullable: true })
  equipment: string;

  @Column({ comment: '测量时间', nullable: true })
  measurementTime: Date;

  @Index()
  @Column({ comment: '姓名', nullable: true })
  name: string;

  @Column({ comment: '性别', dict: ['男', '女', '未知'], default: 2 })
  gender: number;

  @Column({ comment: '出生日期', nullable: true })
  birthdate: Date;

  @Index()
  @Column({ comment: '手机号码', nullable: true })
  phoneNumber: string;

  @Column({ comment: '身份证号', nullable: true })
  idCard: string;

  @Index()
  @Column({ comment: '医院ID', nullable: true })
  hospitalID: string;

  @Index()
  @Column({ comment: '编号', nullable: true })
  number: string;

  @Column({ comment: '任务ID', nullable: true })
  taskID: string;

  @Column({
    comment: '右眼AL',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  odAL: number;

  @Column({
    comment: '右眼ALCR',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  odALCR: number;

  @Column({ comment: '右眼AL源数据', nullable: true })
  odALSrc: string;

  @Column({ comment: '右眼AST', nullable: true })
  odAST: string;

  @Column({ comment: '右眼K1', nullable: true })
  odK1: string;

  @Column({ comment: '右眼K2', nullable: true })
  odK2: string;

  @Column({
    comment: '右眼PD',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  odPD: number;

  @Column({ comment: '右眼SD', nullable: true })
  odSD: string;

  @Column({
    comment: '右眼WTW',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  odWTW: number;

  @Column({
    comment: '左眼AL',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  osAL: number;

  @Column({
    comment: '左眼ALCR',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  osALCR: number;

  @Column({ comment: '左眼AL源数据', nullable: true })
  osALSrc: string;

  @Column({ comment: '左眼AST', nullable: true })
  osAST: string;

  @Column({ comment: '左眼K1', nullable: true })
  osK1: string;

  @Column({ comment: '左眼K2', nullable: true })
  osK2: string;

  @Column({
    comment: '左眼PD',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  osPD: number;

  @Column({ comment: '左眼SD', nullable: true })
  osSD: string;

  @Column({
    comment: '左眼WTW',
    type: 'decimal',
    precision: 10,
    scale: 2,
    nullable: true,
  })
  osWTW: number;

  @Column({ comment: '备注', nullable: true })
  comment: string;

  @Column({ comment: '时长', nullable: true })
  duration: number;

  @Column({ comment: '班级', nullable: true })
  klass: string;

  @Column({ comment: '学生编号', nullable: true })
  studentCode: string;

  @Column({ comment: '学生ID', nullable: true })
  studentID: string;

  @Column({ comment: '用户名', nullable: true })
  username: string;

  @Column({ comment: '密码', nullable: true })
  password: string;
}
